/* Base styles for the embedded form */
:root {
    --purple-primary: #6a11cb;
    --purple-secondary: #8e44ad;
    --blue-primary: #1e88e5;
    --blue-secondary: #3498db;
    --green-primary: #2ecc71;
    --green-secondary: #27ae60;
    --pink-primary: #e91e63;
    --pink-secondary: #d81b60;
    --orange-primary: #ff9800;
    --orange-secondary: #f57c00;
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-dark: #121212;
    --bg-light: #f5f5f5;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background-color: transparent;
    color: var(--text-dark);
    overflow: hidden;
}

.embed-body {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    margin: 0;
    overflow: hidden;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Theme styles */
.theme-purple {
    --primary-color: var(--purple-primary);
    --secondary-color: var(--purple-secondary);
    --gradient: linear-gradient(135deg, var(--purple-primary), var(--purple-secondary));
}

.theme-blue {
    --primary-color: var(--blue-primary);
    --secondary-color: var(--blue-secondary);
    --gradient: linear-gradient(135deg, var(--blue-primary), var(--blue-secondary));
}

.theme-green {
    --primary-color: var(--green-primary);
    --secondary-color: var(--green-secondary);
    --gradient: linear-gradient(135deg, var(--green-primary), var(--green-secondary));
}

.theme-pink {
    --primary-color: var(--pink-primary);
    --secondary-color: var(--pink-secondary);
    --gradient: linear-gradient(135deg, var(--pink-primary), var(--pink-secondary));
}

.theme-orange {
    --primary-color: var(--orange-primary);
    --secondary-color: var(--orange-secondary);
    --gradient: linear-gradient(135deg, var(--orange-primary), var(--orange-secondary));
}

/* Container styles */
.embed-container {
    width: 100%;
    max-width: 400px;
    height: 500px;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Header styles */
.embed-event-header {
    background: var(--gradient);
    color: var(--text-light);
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.embed-event-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.embed-custom-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
    max-width: 100%;
    height: 80px;
}

.embed-custom-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.embed-spotify-logo {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 5px;
}

.embed-spotify-logo i {
    color: #1DB954;
}

/* Main content styles */
.embed-main-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

/* Form styles */
.embed-request-form {
    margin-top: 10px;
}

.embed-form-group {
    margin-bottom: 20px; /* Base margin for all form groups */
}

/* Specific margins for different form groups */
.artist-group {
    margin-bottom: 15px; /* Less space between artist and song */
}

.song-group {
    margin-bottom: 25px; /* More space between song and name */
}

.embed-form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: #555;
}

.embed-input-group {
    display: flex;
    position: relative;
    border-radius: 0;
    overflow: visible;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Override any browser-specific styles */
input.embed-form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}


.embed-input-group-text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    background-color: var(--primary-color);
    color: var(--text-light);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.embed-form-control {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-left: none;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
    border-radius: 0 var(--border-radius) var(--border-radius) 0 !important;
    -webkit-border-radius: 0 var(--border-radius) var(--border-radius) 0 !important;
    -moz-border-radius: 0 var(--border-radius) var(--border-radius) 0 !important;
}

.embed-form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(106, 17, 203, 0.1);
    border-radius: 0 var(--border-radius) var(--border-radius) 0 !important;
    -webkit-border-radius: 0 var(--border-radius) var(--border-radius) 0 !important;
    -moz-border-radius: 0 var(--border-radius) var(--border-radius) 0 !important;
}

/* Button styles */
.embed-submit-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 30px; /* Tripled from 10px to 30px */
    background: var(--gradient);
    color: var(--text-light);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.embed-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.embed-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Message styles */
.embed-message {
    padding: 10px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.embed-message.error {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--error-color);
    border-left: 3px solid var(--error-color);
    padding: 12px 15px;
    font-size: 0.95rem;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.embed-message.success {
    background-color: rgba(46, 204, 113, 0.1);
    color: var(--success-color);
    border-left: 3px solid var(--success-color);
    padding: 12px 15px;
    font-size: 0.95rem;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Code input form */
.embed-code-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    height: 100%;
    text-align: center;
}

.embed-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 10px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
}

.embed-code-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    text-align: center;
    margin: 15px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.embed-code-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Autocomplete styles */
.embed-loading-indicator {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    color: var(--primary-color);
}

.embed-autocomplete-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.embed-autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: var(--transition);
}

.embed-autocomplete-item:hover,
.embed-autocomplete-item.selected {
    background-color: rgba(106, 17, 203, 0.1);
}

/* Success overlay */
.embed-success-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn 0.5s ease forwards;
}

.embed-success-icon-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.embed-success-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    animation: pulse 2s infinite;
    z-index: 2;
}

.embed-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid white;
    opacity: 0.7;
}

.embed-ring1 {
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    animation: ripple 2s infinite;
}

.embed-ring2 {
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    animation: ripple 2s infinite 0.5s;
}

.embed-success-subtitle {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin-top: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Responsive adjustments */
@media (max-width: 400px) {
    .embed-container {
        border-radius: 0;
        height: 100vh;
    }
    
    .embed-event-title {
        font-size: 1.3rem;
    }
    
    .embed-form-label {
        font-size: 0.85rem;
    }
    
    .embed-form-control {
        font-size: 0.9rem;
    }
}
