/* Demo Modal Styles */
.demo-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.demo-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.demo-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin: auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transform: translateY(-50px);
    animation: slideDown 0.3s ease-out;
    position: relative;
    overflow: hidden; 
}

.demo-modal-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 16px 16px 0 0;
    position: relative;
}

.demo-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="0%" r="100%"><stop offset="0%" stop-color="white" stop-opacity=".1"/><stop offset="100%" stop-color="white" stop-opacity="0"/></radialGradient></defs><rect width="100" height="20" fill="url(%23a)"/></svg>');
    pointer-events: none;
}

.demo-modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.demo-modal-close {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.demo-modal-close:hover,
.demo-modal-close:focus {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.demo-modal-body {
    padding: 30px;
}

.demo-form-group {
    margin-bottom: 20px;
}

.demo-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
}

.demo-form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #ffffff;
    box-sizing: border-box;
}

.demo-form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    transform: translateY(-2px);
}

.demo-form-control:hover {
    border-color: #007bff;
}

.demo-form-control.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.demo-error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
    display: none;
}

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

.demo-form-row {
    display: flex;
    gap: 15px;
}

.demo-form-row .demo-form-group {
    flex: 1;
}

.demo-submit-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.demo-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

.demo-submit-btn:active {
    transform: translateY(0);
}

.demo-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.demo-submit-btn .loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

.demo-submit-btn.loading .loading-spinner {
    display: inline-block;
}

.demo-submit-btn.loading .btn-text {
    opacity: 0.8;
}

.demo-success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
    animation: slideIn 0.3s ease-out;
}

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

.demo-privacy-notice {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 15px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

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

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

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateX(-20px);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .demo-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .demo-modal-header {
        padding: 20px 25px;
    }
    
    .demo-modal-body {
        padding: 25px;
    }
    
    .demo-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .demo-modal-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .demo-modal-content {
        width: 98%;
        margin: 10px;
    }
    
    .demo-modal-header {
        padding: 15px 20px;
    }
    
    .demo-modal-body {
        padding: 20px;
    }
}
