/* BSD Feedback Collection - Premium Elegant Frontend Styles */

* {
    box-sizing: border-box;
}

:root {
    --primary: #FABC2D;
    --primary-dark: #e5ab1e;
    --primary-light: #fcd04d;
    --secondary: #1a1a1a;
    --accent: #2d2d2d;
    --light: #f8f9fa;
    --text: #333;
    --border: #e5e5e5;
    --success: #28a745;
    --error: #dc3545;
    --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.bsd-feedback-container,
.bsd-feedback-container * {
    font-family: var(--font);
}

.bsd-feedback-container {
    margin: 50px 0;
    padding: 20px;
    background: #f5f5f5;
}

.bsd-feedback-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Decorative gradient background */
.bsd-feedback-wrapper::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.bsd-feedback-wrapper::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(26, 26, 26, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.bsd-feedback-header {
    background: #ffffff;
    color: var(--secondary);
    padding: 40px 35px 36px;
    text-align: center;
    position: relative;
    border-bottom: 3px solid var(--primary);
}

.bsd-feedback-header::before,
.bsd-feedback-header::after {
    display: none;
}

.bsd-feedback-logo {
    display: block;
    margin: 0 auto 20px;
    max-height: 56px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
}

.bsd-feedback-header h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--secondary);
    background: none;
    -webkit-text-fill-color: var(--secondary);
}

.bsd-feedback-header p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.bsd-feedback-form {
    padding: 45px 35px;
    position: relative;
    z-index: 1;
}

.bsd-form-group {
    margin-bottom: 26px;
    position: relative;
}

.bsd-form-group:last-of-type {
    margin-bottom: 30px;
}

.bsd-form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    position: relative;
    padding-left: 0;
}

.bsd-required {
    color: var(--primary);
    margin-left: 4px;
    font-size: 16px;
    line-height: 1;
}

.bsd-form-input,
.bsd-form-textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid var(--border);
    border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font);
    background: #ffffff;
    color: var(--secondary);
    position: relative;
}

.bsd-form-input::placeholder,
.bsd-form-textarea::placeholder {
    color: #ccc;
    font-weight: 400;
}

.bsd-form-input:hover,
.bsd-form-textarea:hover {
    border-color: rgba(250, 188, 45, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.bsd-form-input:focus,
.bsd-form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(250, 188, 45, 0.2);
    transform: translateY(-1px);
}

.bsd-form-textarea {
    resize: vertical;
    font-size: 14px;
    line-height: 1.6;
    min-height: 130px;
}

.bsd-form-input.error,
.bsd-form-textarea.error {
    border-color: var(--error);
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.02) 0%, rgba(220, 53, 69, 0.01) 100%);
}

.bsd-form-input.error:focus,
.bsd-form-textarea.error:focus {
    box-shadow: 
        0 0 0 4px rgba(220, 53, 69, 0.15),
        0 8px 20px rgba(220, 53, 69, 0.1);
}

.bsd-error-text {
    display: none;
    margin-top: 8px;
    font-size: 12px;
    color: var(--error);
    font-weight: 600;
    animation: slideInDown 0.3s ease-out;
    padding-left: 2px;
}

.bsd-error-text.show {
    display: block;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Premium Submit Button */
.bsd-submit-btn {
    width: 100%;
    padding: 15px 32px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--secondary);
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 900;
    font-family: var(--font);
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    box-shadow: 0 4px 14px rgba(250, 188, 45, 0.35);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
}

.bsd-submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: 0;
}

.bsd-submit-btn:hover::before {
    width: 300px;
    height: 300px;
}

.bsd-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(250, 188, 45, 0.45);
}

.bsd-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(250, 188, 45, 0.3);
}

.bsd-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.bsd-btn-text,
.bsd-btn-loader {
    position: relative;
    z-index: 1;
}

.bsd-btn-loader {
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.bsd-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(26, 26, 26, 0.2);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: bsd-spin 0.6s linear infinite;
}

/* Success Message */
.bsd-success-message {
    display: none;
    padding: 16px 20px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid var(--success);
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 700;
    animation: slideDownSuccess 0.4s ease-out;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.15);
}

.bsd-success-message.show {
    display: block;
}

/* Error Message Box */
.bsd-error-message {
    display: none;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid var(--error);
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 700;
    animation: slideDownError 0.4s ease-out;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
}

.bsd-error-message.show {
    display: block;
}

@keyframes slideDownSuccess {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDownError {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Lottery reward popup */
body.bsd-lottery-popup-open {
    overflow: hidden;
}

.bsd-lottery-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bsd-lottery-popup-overlay.bsd-lottery-popup-visible {
    opacity: 1;
    visibility: visible;
}

.bsd-lottery-popup {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bsd-lottery-popup-overlay.bsd-lottery-popup-visible .bsd-lottery-popup {
    transform: scale(1);
}

.bsd-lottery-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    z-index: 2;
}

.bsd-lottery-popup-close:hover {
    color: var(--secondary);
    background: #f0f0f0;
}

.bsd-lottery-popup-inner {
    padding: 36px 28px 28px;
    text-align: center;
}

.bsd-lottery-icon {
    font-size: 48px;
    margin-bottom: 12px;
    line-height: 1;
}

.bsd-lottery-title {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: -0.5px;
}

.bsd-lottery-intro {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.bsd-lottery-number-box {
    padding: 20px 24px;
    margin: 0 0 20px 0;
    background: linear-gradient(135deg, #fef9e6 0%, #fef5d4 100%);
    border: 2px dashed var(--primary);
    border-radius: 8px;
}

.bsd-lottery-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: 4px;
}

.bsd-lottery-note {
    margin: 0 0 24px 0;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.6;
}

.bsd-lottery-note strong {
    color: var(--secondary);
}

.bsd-lottery-popup-btn {
    display: inline-block;
    padding: 12px 32px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--secondary);
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.bsd-lottery-popup-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(250, 188, 45, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .bsd-feedback-header {
        padding: 36px 28px 32px;
    }

    .bsd-feedback-logo {
        max-height: 48px;
        max-width: 240px;
        margin-bottom: 16px;
    }

    .bsd-feedback-header h2 {
        font-size: 26px;
    }

    .bsd-feedback-form {
        padding: 35px 28px;
    }

    .bsd-form-group {
        margin-bottom: 22px;
    }

    .bsd-form-input,
    .bsd-form-textarea {
        padding: 12px 14px;
        font-size: 13px;
    }
}

@media (max-width: 600px) {
    .bsd-feedback-wrapper {
        margin: 0 -20px;
        border-radius: 12px;
    }

    .bsd-feedback-header {
        padding: 28px 22px 26px;
    }

    .bsd-feedback-logo {
        max-height: 44px;
        max-width: 200px;
        margin-bottom: 14px;
    }

    .bsd-feedback-header h2 {
        font-size: 22px;
    }

    .bsd-feedback-header p {
        font-size: 13px;
    }

    .bsd-feedback-form {
        padding: 30px 22px;
    }

    .bsd-form-group {
        margin-bottom: 18px;
    }

    .bsd-form-group label {
        font-size: 11px;
    }

    .bsd-form-input,
    .bsd-form-textarea {
        padding: 12px 13px;
        border-radius: 4px;
    }

    .bsd-form-textarea {
        min-height: 110px;
    }

    .bsd-submit-btn {
        padding: 13px 24px;
        font-size: 13px;
        min-height: 46px;
        border-radius: 4px;
    }
}

@media (max-width: 400px) {
    .bsd-feedback-header {
        padding: 24px 18px 22px;
    }

    .bsd-feedback-logo {
        max-height: 40px;
        max-width: 180px;
    }

    .bsd-feedback-form {
        padding: 25px 18px;
    }

    .bsd-feedback-header h2 {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .bsd-form-input,
    .bsd-form-textarea {
        font-size: 16px;
        padding: 11px 12px;
    }
}

/* Rating field styles */
.bsd-rating-group {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.bsd-rating-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    gap: 6px;
}

.bsd-rating-radio {
    display: none;
}

.bsd-rating-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    font-size: 17px;
    font-weight: 800;
    font-family: var(--font);
    color: #6b7280;
    background: #fff;
    transition: all 0.2s ease;
    cursor: pointer;
}

.bsd-rating-option input:checked + .bsd-rating-circle {
    border-color: #FABC2D;
    background: #FABC2D;
    color: #1a1a1a;
}

.bsd-rating-circle:hover {
    border-color: #FABC2D;
    color: #1a1a1a;
}
