/* Clynx URL Switcher - Frontend Styles */
/* Rajyotsava Colors: Red (#DC143C) and Yellow (#FFC107) */

.clynx-container {
    max-width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

.clynx-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #FFC107 0%, #FFD54F 50%, #DC143C 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.2);
}

.clynx-search-wrapper {
    flex: 1;
    min-width: 200px;
}

.clynx-search {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #DC143C;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
    background-color: #FFF9E6;
}

.clynx-search:focus {
    outline: none;
    border-color: #DC143C;
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
    background-color: white;
}

.clynx-dropdown-wrapper {
    flex: 2;
    min-width: 250px;
}

.clynx-selector {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #DC143C;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.clynx-selector:focus {
    outline: none;
    border-color: #DC143C;
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.clynx-button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clynx-button-primary {
    background-color: #DC143C;
    color: white;
    box-shadow: 0 2px 4px rgba(220, 20, 60, 0.3);
}

.clynx-button-primary:hover:not(:disabled) {
    background-color: #B01030;
    box-shadow: 0 4px 8px rgba(220, 20, 60, 0.4);
    transform: translateY(-1px);
}

.clynx-button-secondary {
    background-color: #FFC107;
    color: #333;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.clynx-button-secondary:hover:not(:disabled) {
    background-color: #FFB300;
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.4);
    transform: translateY(-1px);
}

.clynx-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.clynx-iframe-container {
    border: 3px solid #DC143C;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(220, 20, 60, 0.2);
}

.clynx-iframe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(90deg, #FFC107 0%, #DC143C 100%);
    border-bottom: 2px solid #DC143C;
}

.clynx-current-title {
    font-weight: 700;
    color: white;
    font-size: 16px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.clynx-close-button {
    background: white;
    border: 2px solid #DC143C;
    font-size: 24px;
    color: #DC143C;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    font-weight: bold;
}

.clynx-close-button:hover {
    background-color: #DC143C;
    color: white;
    transform: rotate(90deg);
}

.clynx-iframe {
    width: 100%;
    border: none;
    display: block;
}

.clynx-no-results {
    padding: 20px;
    text-align: center;
    color: #DC143C;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFE6E6 100%);
    border: 2px solid #DC143C;
    border-radius: 8px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .clynx-controls {
        flex-direction: column;
        padding: 10px;
    }
    
    .clynx-search-wrapper,
    .clynx-dropdown-wrapper {
        width: 100%;
    }
    
    .clynx-button {
        width: 100%;
    }
}

/* Loading state */
.clynx-loading {
    position: relative;
}

.clynx-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #FFC107;
    border-top: 4px solid #DC143C;
    border-radius: 50%;
    animation: clynx-spin 1s linear infinite;
}

@keyframes clynx-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Rajyotsava themed accents */
.clynx-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FFC107 0%, #DC143C 50%, #FFC107 100%);
    border-radius: 8px 8px 0 0;
}

/* Pulsing effect for buttons when enabled */
@keyframes pulse-red {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(220, 20, 60, 0.3);
    }
    50% {
        box-shadow: 0 4px 12px rgba(220, 20, 60, 0.5);
    }
}

@keyframes pulse-yellow {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
    }
    50% {
        box-shadow: 0 4px 12px rgba(255, 193, 7, 0.5);
    }
}

.clynx-button-primary:not(:disabled):hover {
    animation: pulse-red 2s infinite;
}

.clynx-button-secondary:not(:disabled):hover {
    animation: pulse-yellow 2s infinite;
}


