/**
 * API Widgets Styles
 * Weather, What3Words, and other API integration widgets
 */

/* 2FA OTP Container */
.toad-2fa-container {
    background: #f8f9fa;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    animation: slideDown 0.3s ease-out;
}

.toad-2fa-container h3 {
    color: #667eea;
    margin: 0 0 15px 0;
    font-size: 1.4em;
}

.toad-2fa-container p {
    color: #666;
    line-height: 1.6;
}

.toad-2fa-container #otp_code {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
    padding: 15px;
    font-size: 24px !important;
    letter-spacing: 0.5em !important;
    text-align: center !important;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.toad-2fa-container #otp_code:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Weather Widget */
.toad-weather-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.toad-weather-widget .weather-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.toad-weather-widget .weather-icon {
    font-size: 48px;
}

.toad-weather-widget .weather-temp {
    font-size: 36px;
    font-weight: bold;
}

.toad-weather-widget .weather-desc {
    font-size: 16px;
    opacity: 0.9;
}

.toad-weather-widget .weather-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.toad-weather-widget .weather-detail {
    text-align: center;
}

.toad-weather-widget .weather-detail-label {
    font-size: 12px;
    opacity: 0.8;
}

.toad-weather-widget .weather-detail-value {
    font-size: 16px;
    font-weight: 600;
}

/* Toad Activity Indicator */
.toad-activity-indicator {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    border-left: 4px solid #4CAF50;
}

.toad-activity-indicator.low {
    border-left-color: #ff9800;
}

.toad-activity-indicator.inactive {
    border-left-color: #9e9e9e;
}

.toad-activity-indicator .activity-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.toad-activity-indicator .activity-desc {
    font-size: 14px;
    color: #666;
}

/* What3Words Widget */
.toad-w3w-widget {
    background: #fff;
    border: 2px solid #e9473f;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.toad-w3w-widget .w3w-logo {
    color: #e9473f;
    font-size: 24px;
    margin-bottom: 10px;
}

.toad-w3w-widget .w3w-address {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 18px;
    color: #e9473f;
    font-weight: 600;
}

.toad-w3w-widget .w3w-address::before {
    content: '///';
    opacity: 0.6;
}

.toad-w3w-widget .w3w-coords {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* 2FA Inline Form */
.toad-2fa-form {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
}

.toad-2fa-form .toad-2fa-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.toad-2fa-form h3 {
    color: #333;
    margin-bottom: 10px;
}

.toad-2fa-form p {
    color: #666;
    margin-bottom: 20px;
}

.toad-2fa-form .form-group {
    display: block !important;
    text-align: left;
    max-width: 300px;
    margin: 0 auto 15px;
}

.toad-2fa-form input[type="text"] {
    text-align: center;
    font-size: 24px;
    letter-spacing: 5px;
    padding: 15px;
}

.toad-2fa-form button {
    max-width: 300px;
    margin: 0 auto;
}

.toad-2fa-form #cancel-2fa {
    color: #6c757d;
    font-size: 14px;
}

.toad-2fa-form #cancel-2fa:hover {
    color: #495057;
}

/* Map Info Widgets */
.map-info-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    max-width: 250px;
}

.map-legend {
    position: absolute;
    bottom: 30px;
    left: 10px;
    z-index: 1000;
    background: white;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.map-legend h4 {
    font-size: 12px;
    margin: 0 0 8px 0;
    color: #666;
    text-transform: uppercase;
}

.map-legend-item {
    display: flex;
    align-items: center;
    margin: 5px 0;
    font-size: 13px;
}

.map-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.map-legend-dot.found {
    background: #ff6b6b;
}

.map-legend-dot.rewilded {
    background: #51cf66;
}

.map-legend-dot.hazard {
    background: #ffd43b;
}

/* Responsive */
@media (max-width: 768px) {
    .toad-weather-widget .weather-details {
        grid-template-columns: repeat(2, 1fr);
    }

    .map-info-overlay {
        top: auto;
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
