/* Sun Moon Alignment Calculator - Frontend Styles */

.smac-frontend-wrap {
    max-width: 1000px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.smac-frontend-form-section {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    color: #fff;
}

.smac-saved-locations-frontend {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.smac-saved-locations-frontend label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.smac-saved-locations-frontend select {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
}

.smac-frontend-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.smac-frontend-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
}

.smac-frontend-field input,
.smac-frontend-field select {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fff !important;
    color: #333 !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.smac-frontend-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    padding-right: 35px;
}

.smac-frontend-field input::placeholder {
    color: #999 !important;
}

.smac-frontend-field input[type="date"] {
    color: #333 !important;
}

.smac-frontend-field input[type="number"] {
    color: #333 !important;
}

.smac-saved-locations-frontend select {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    background: #fff !important;
    color: #333 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 35px;
}

.smac-saved-locations-frontend select option,
.smac-frontend-field select option {
    background: #fff;
    color: #333;
}

.smac-frontend-filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
}

.smac-filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.smac-filter-item label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.smac-checkbox-inline {
    display: flex;
    gap: 15px;
}

.smac-frontend-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.smac-frontend-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.smac-btn-primary {
    background: #f59e0b;
    color: #000;
}

.smac-btn-primary:hover {
    background: #d97706;
}

.smac-btn-secondary {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.smac-btn-secondary:hover {
    background: rgba(255,255,255,0.3);
}

.smac-btn-small {
    padding: 6px 12px;
    font-size: 12px;
    background: #e5e7eb;
    color: #374151;
}

.smac-btn-small:hover {
    background: #d1d5db;
}

.smac-frontend-loader {
    display: flex;
    align-items: center;
    gap: 8px;
}

.smac-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: smac-spin 0.8s linear infinite;
}

@keyframes smac-spin {
    to { transform: rotate(360deg); }
}

/* Map */
.smac-frontend-map-container {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

.smac-frontend-map-container h3 {
    margin: 0 0 15px;
    color: #1e3a5f;
}

.smac-frontend-map-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.smac-frontend-map-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    flex: 1;
    min-width: 150px;
}

.smac-frontend-map-info {
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
    border-left: 4px solid #1e3a5f;
}

.smac-frontend-map-info code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.smac-frontend-map-info a {
    margin-left: 10px;
    color: #1e3a5f;
    text-decoration: none;
    font-weight: 600;
}

/* Results */
.smac-frontend-results {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.smac-frontend-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.smac-frontend-results-header h3 {
    margin: 0;
    color: #1e3a5f;
}

.smac-frontend-export {
    display: flex;
    gap: 8px;
}

.smac-frontend-summary {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.smac-stat {
    font-size: 14px;
}

.smac-frontend-table-wrap {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.smac-frontend-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.smac-frontend-table th {
    background: #1e3a5f;
    color: #fff;
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.smac-frontend-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.smac-frontend-table tr:hover {
    background: #f8f9fa;
}

.smac-map-btn {
    background: #1e3a5f;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.smac-map-btn:hover {
    background: #2d5a87;
}

/* Moon Phase Icons */
.smac-moon-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 5px;
    background: #1a1a2e;
    box-shadow: inset 0 0 3px rgba(255,255,255,0.3);
}

.smac-moon-icon.new-moon { 
    background: #1a1a2e; 
}

.smac-moon-icon.waxing-crescent { 
    background: linear-gradient(90deg, #1a1a2e 60%, #f4f4f4 60%); 
}

.smac-moon-icon.first-quarter { 
    background: linear-gradient(90deg, #1a1a2e 50%, #f4f4f4 50%); 
}

.smac-moon-icon.waxing-gibbous { 
    background: linear-gradient(90deg, #1a1a2e 25%, #f4f4f4 25%); 
}

.smac-moon-icon.full-moon { 
    background: #f4f4f4; 
    box-shadow: 0 0 6px rgba(255,255,200,0.8); 
}

.smac-moon-icon.waning-gibbous { 
    background: linear-gradient(90deg, #f4f4f4 75%, #1a1a2e 75%); 
}

.smac-moon-icon.last-quarter { 
    background: linear-gradient(90deg, #f4f4f4 50%, #1a1a2e 50%); 
}

.smac-moon-icon.waning-crescent { 
    background: linear-gradient(90deg, #f4f4f4 40%, #1a1a2e 40%); 
}

/* Badges */
.smac-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.smac-badge-sun {
    background: #fef3c7;
    color: #92400e;
}

.smac-badge-moon {
    background: #e0e7ff;
    color: #3730a3;
}

.smac-badge-rising {
    background: #d1fae5;
    color: #065f46;
}

.smac-badge-setting {
    background: #fee2e2;
    color: #991b1b;
}

/* Login Notice */
.smac-login-notice {
    background: #fef3c7;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
}

.smac-login-notice p {
    margin: 0 0 15px;
    color: #92400e;
}

/* Decoded Coordinates */
.smac-decoded-coords {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    font-size: 13px;
}

.smac-coords-label {
    margin-right: 8px;
    opacity: 0.8;
}

.smac-decoded-coords code {
    background: rgba(0,0,0,0.2);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
}

.smac-field-hint {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    opacity: 0.7;
}

.smac-field-wide {
    grid-column: span 2;
}

.smac-input-valid {
    border-color: #22c55e !important;
}

.smac-input-error {
    border-color: #ef4444 !important;
}

/* Responsive */
@media (max-width: 600px) {
    .smac-frontend-form-section {
        padding: 15px;
    }
    
    .smac-frontend-form-grid {
        grid-template-columns: 1fr;
    }
    
    .smac-frontend-filters-form {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .smac-frontend-results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .smac-frontend-map-controls {
        flex-direction: column;
    }
    
    .smac-frontend-map-controls select {
        width: 100%;
    }
}

/* ===== v2.5.0 enhancements ===== */
.smac-muted { color: #94a3b8; font-size: 0.85em; }

.smac-stars { color: #f59e0b; letter-spacing: 1px; white-space: nowrap; }

/* Light phase badges */
.smac-light {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.smac-light-golden   { background: #fde68a; color: #92400e; }
.smac-light-blue     { background: #bfdbfe; color: #1e3a8a; }
.smac-light-twilight { background: #ddd6fe; color: #5b21b6; }
.smac-light-day      { background: #fef3c7; color: #78350f; }
.smac-light-night    { background: #1e293b; color: #cbd5e1; }

/* Supermoon / micromoon */
.smac-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    vertical-align: middle;
}
.smac-badge-super { background: #f59e0b; color: #1f2937; }
.smac-badge-micro { background: #e5e7eb; color: #4b5563; }

/* Best opportunity highlight */
.smac-best {
    display: block;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(245, 158, 11, 0.12);
    border-left: 3px solid #f59e0b;
    border-radius: 6px;
    color: #1f2937;
    font-size: 13px;
}
.smac-row-best { background: rgba(245, 158, 11, 0.10); }
.smac-row-best td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }

.smac-link-btn {
    background: none; border: none; color: #2563eb;
    cursor: pointer; text-decoration: underline; font-size: 13px; padding: 0 4px;
}

/* Framing helper box */
.smac-framing {
    margin-top: 8px;
    padding: 8px 10px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 12.5px;
    color: #0f172a;
    line-height: 1.5;
}

.smac-sort-label { font-size: 12px; color: #fff; margin-right: 6px; }
.smac-sort-label select { padding: 4px 6px; border-radius: 4px; border: none; }

/* Make the results table comfortable with more columns */
.smac-frontend-table th, .smac-frontend-table td { padding: 8px 6px; font-size: 13px; }

/* ===== v2.6.0 Photographer's Toolkit ===== */

/* Moon outlook strip */
.smac-frontend-moon-outlook {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin: 10px 0 4px;
    padding: 10px 14px;
    background: #f1f5ff;
    border: 1px solid #dbe3f7;
    border-radius: 8px;
    font-size: 14px;
    color: #1f2937;
}
.smac-outlook-item strong { color: #1d4ed8; }
.smac-outlook-note {
    color: #6b7280;
    font-size: 12px;
    margin-left: auto;
}

/* Shot plan card */
.smac-frontend-shot-plan {
    margin-top: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.smac-sp-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
}
.smac-sp-preview { flex: 0 0 260px; max-width: 100%; }
.smac-frame-svg {
    width: 260px;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}
.smac-sp-caption {
    margin-top: 6px;
    font-size: 12px;
    color: #475569;
    text-align: center;
    font-weight: 600;
}
.smac-sp-details { flex: 1 1 300px; min-width: 260px; }
.smac-sp-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}
.smac-sp-row {
    font-size: 14px;
    color: #1f2937;
    margin: 6px 0;
}
.smac-sp-row code {
    background: #0f172a;
    color: #f8fafc;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 13px;
}
.smac-sp-tip {
    font-size: 12.5px;
    color: #6b7280;
    margin: 4px 0 10px;
    line-height: 1.45;
}
.smac-sp-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.smac-sp-links a {
    display: inline-block;
    padding: 6px 12px;
    background: #eef2ff;
    color: #1d4ed8;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #dbe3f7;
}
.smac-sp-links a:hover { background: #dde6ff; }

@media (max-width: 600px) {
    .smac-sp-preview { flex-basis: 100%; }
    .smac-frame-svg { width: 100%; }
    .smac-outlook-note { margin-left: 0; flex-basis: 100%; }
}

/* v2.7.0 lens-driven solver */
.smac-sp-solver {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    color: #065f46;
    margin: 6px 0;
}
.smac-sp-solver.smac-sp-warn {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}
#smac-frontend-frame-mode,
#smac-frontend-focal-input { height: 38px; }
