/**
 * Hasta Görsel Paylaşım Onam Formu - Stil Dosyası
 * Modern, Responsive ve Profesyonel Tasarım
 * Renk Paleti: Turkuaz ve Beyaz Tonları
 */

/* ==================== CSS Variables - KM Dental Design ==================== */
:root {
    /* Primary Colors - KM Logo Gradient */
    --primary-color: #6E7CA2; /* Logo açık mavi-gri */
    --primary-dark: #1F2638; /* Logo koyu lacivert-gri */
    --primary-light: #8B98C4;
    --accent-color: #5A6A91;
    --secondary-color: #64748b;
    
    /* Status Colors */
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #5A6A91;
    
    /* Neutral Colors */
    --white: #ffffff;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    /* Gradients - KM Logo Style */
    --gradient-primary: linear-gradient(180deg, #1F2638 35%, #6E7CA2 100%);
    --gradient-bg: linear-gradient(180deg, #1F2638 0%, #3a4a6b 50%, #6E7CA2 100%);
    --gradient-light: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%);
    --gradient-reverse: linear-gradient(180deg, #6E7CA2 0%, #1F2638 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(31, 38, 56, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(31, 38, 56, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(31, 38, 56, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(31, 38, 56, 0.25);
    
    /* Border Radius */
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ==================== Global Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background: var(--gradient-bg);
    background-attachment: fixed;
    line-height: 1.6;
    min-height: 100vh;
    padding: 40px 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(110, 124, 162, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(31, 38, 56, 0.3) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ==================== Container ==================== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px;
}

.form-wrapper {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 50px;
    animation: fadeInUp 0.6s ease;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== Form Header ==================== */
.form-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 35px;
    border-bottom: none;
    position: relative;
}

.form-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.logo-container {
    display: inline-block;
    margin-bottom: 20px;
}

.clinic-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    padding: 10px;
}

.clinic-main-logo {
    width: 180px;
    height: auto;
    max-width: 100%;
    filter: drop-shadow(0 10px 25px rgba(31, 38, 56, 0.15));
    animation: logoFloat 3s ease-in-out infinite;
    transition: var(--transition);
}

.clinic-main-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 15px 35px rgba(31, 38, 56, 0.25));
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.clinic-name {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.form-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ==================== Form Sections ==================== */
.form-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    position: relative;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 28px;
    background: var(--gradient-primary);
    margin-right: 15px;
    border-radius: 3px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: var(--gradient-primary);
}

.section-description {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* ==================== Form Groups ==================== */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.required {
    color: var(--danger-color);
    font-weight: 700;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    font-family: var(--font-family);
    background: var(--white);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(110, 124, 162, 0.1);
    transform: translateY(-1px);
}

.form-input.error {
    border-color: var(--danger-color);
}

.form-hint {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 6px;
    font-style: italic;
}

.error-message {
    display: none;
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 6px;
    font-weight: 500;
}

.error-message.show {
    display: block;
}

/* ==================== Checkbox ==================== */
.checkbox-group {
    margin-top: 20px;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 8px;
    border: 2px solid transparent;
    transition: var(--transition);
}

.checkbox-group.error {
    border-color: var(--danger-color);
    background: rgba(220, 53, 69, 0.05);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--primary-color);
}

.checkbox-text {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.5;
}

/* ==================== Consent Box ==================== */
.consent-box {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 20px;
    border-left: 5px solid var(--primary-color);
}

.consent-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.consent-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.consent-item:last-child {
    margin-bottom: 0;
}

.consent-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    margin-right: 15px;
    color: var(--primary-color);
}

.consent-icon svg {
    width: 100%;
    height: 100%;
}

.consent-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-color);
    margin: 0;
}

.consent-main-text {
    background: var(--white);
    border: none;
    box-shadow: none;
    padding: 20px;
    margin-bottom: 20px;
}

.consent-main-text .consent-text {
    font-size: 1rem;
    text-align: justify;
    line-height: 1.8;
    color: var(--text-color);
}

.consent-notes {
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}

.notes-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-bg);
}

.notes-list {
    list-style: none;
    padding-left: 0;
}

.notes-list li {
    padding: 12px 0 12px 30px;
    position: relative;
    line-height: 1.7;
    border-bottom: 1px solid var(--light-bg);
}

.notes-list li:last-child {
    border-bottom: none;
}

.notes-list li:before {
    content: '•';
    position: absolute;
    left: 10px;
    color: var(--primary-color);
    font-size: 1.5rem;
    line-height: 1.2;
}

.consent-info-box {
    background: linear-gradient(135deg, rgba(110, 124, 162, 0.05) 0%, rgba(31, 38, 56, 0.05) 100%);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    margin-top: 20px;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Personel Bilgileri Kutusu */
.practitioner-info-box {
    background: linear-gradient(135deg, rgba(110, 124, 162, 0.08) 0%, rgba(31, 38, 56, 0.08) 100%);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 25px;
    margin: 20px 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(110, 124, 162, 0.15);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.info-value {
    color: var(--text-color);
    font-weight: 600;
    text-align: right;
    font-size: 0.95rem;
}

.practitioner-section .section-description {
    background: rgba(110, 124, 162, 0.05);
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--primary-color);
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ==================== Signature Pad ==================== */
.signature-container {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 2px dashed var(--border-color);
    transition: var(--transition);
}

.signature-container.error {
    border-color: var(--danger-color);
    background: rgba(220, 53, 69, 0.05);
}

.signature-pad {
    width: 100%;
    height: 200px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: crosshair;
    background: var(--white);
    touch-action: none;
}

.signature-actions {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
}

/* ==================== Buttons ==================== */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-family);
    text-decoration: none;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 10px 25px -5px rgba(31, 38, 56, 0.4);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.btn-primary:hover:not(:disabled) {
    background: var(--gradient-reverse);
    box-shadow: 0 15px 35px -5px rgba(110, 124, 162, 0.5);
    transform: translateY(-3px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--white);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--light-bg);
    border-color: var(--text-muted);
}

.btn-icon {
    width: 20px;
    height: 20px;
}

.btn-secondary svg {
    width: 18px;
    height: 18px;
}

/* ==================== Form Actions ==================== */
.form-actions {
    margin-top: 40px;
    text-align: center;
}

.form-actions .btn-primary {
    min-width: 300px;
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* ==================== KVKK Notice ==================== */
.kvkk-notice {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(19, 132, 150, 0.1) 100%);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 25px;
    margin: 30px 0;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.kvkk-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.kvkk-content {
    flex: 1;
}

.kvkk-content strong {
    display: block;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.kvkk-content p {
    margin-bottom: 10px;
    line-height: 1.6;
    font-size: 0.9rem;
}

.kvkk-content p:last-child {
    margin-bottom: 0;
}

.kvkk-contact {
    font-weight: 600;
    color: var(--primary-dark);
}

/* ==================== Footer ==================== */
.form-footer {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.footer-info {
}

.footer-title {
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.footer-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-weight: 500;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.footer-text svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.footer-admin {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.admin-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(31, 38, 56, 0.3);
    justify-content: center;
}

.admin-link:hover {
    background: var(--gradient-reverse);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(110, 124, 162, 0.4);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-admin {
        text-align: left;
    }
}

/* ==================== Loading Overlay ==================== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: var(--white);
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* ==================== Modal ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: var(--success-color);
}

.modal-icon svg {
    width: 100%;
    height: 100%;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success-color);
    margin-bottom: 15px;
}

.modal-message {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 25px;
    line-height: 1.6;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    body {
        padding: 10px 5px;
    }
    
    .form-wrapper {
        padding: 25px 20px;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    .form-subtitle {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .clinic-main-logo {
        width: 140px;
    }
    
    .consent-box {
        padding: 20px 15px;
    }
    
    .consent-item {
        padding: 15px;
        flex-direction: column;
    }
    
    .consent-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .kvkk-notice {
        flex-direction: column;
        padding: 20px;
    }
    
    .kvkk-icon {
        font-size: 2rem;
    }
    
    .form-actions .btn-primary {
        min-width: 100%;
        font-size: 1rem;
    }
    
    .signature-pad {
        height: 150px;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px 5px;
    }
    
    .container {
        padding: 0 5px;
    }
    
    .form-wrapper {
        padding: 20px 15px;
        border-radius: var(--border-radius-sm);
    }
    
    .form-title {
        font-size: 1.3rem;
    }
    
    .form-subtitle {
        font-size: 0.9rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-col {
        width: 100% !important;
    }
    
    .checkbox-label {
        font-size: 0.9rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 0.95rem;
        width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
}

/* ==================== Print Styles ==================== */
@media print {
    body {
        background: var(--white);
    }
    
    .form-wrapper {
        box-shadow: none;
        padding: 20px;
    }
    
    .form-actions,
    .form-footer,
    .loading-overlay,
    .modal {
        display: none !important;
    }
    
    .signature-actions {
        display: none;
    }
}

/* ==================== Accessibility ==================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: ease-in-out;
}
