/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: #626A59;
    background: #fefefe;
    padding: 20px;
}

.form-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(98, 106, 89, 0.1);
    overflow: hidden;
}

/* Form Header */
.form-header {
    background: #F0F1F5;
    padding: 20px;
    text-align: center;
    border-bottom: 2px solid #626A59;
    position: relative;
}

.back-link {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #626A59;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #9AA497;
}

.form-header h1 {
    font-family: 'Playfair Display', 'Times New Roman', Times, serif;
    font-size: 1.8rem;
    color: #626A59;
    margin-bottom: 12px;
}

.form-header p {
    color: #4a5568;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Wedding Form */
.wedding-form {
    padding: 20px;
}

/* Wedding Header Section */
.wedding-header {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wedding-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.wedding-title {
    background: #626A59;
    color: white;
    padding: 12px 20px;
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.script-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
}

.couple-names-input {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: white;
    color: #2d3748;
    min-width: 300px;
    text-align: center;
    transition: all 0.3s ease;
}

.couple-names-input:focus {
    outline: none;
    border-color: #626A59;
    box-shadow: 0 0 0 3px rgba(98, 106, 89, 0.1);
}

.couple-names-input::placeholder {
    color: #a0aec0;
    font-style: italic;
}

/* General Information Section */
.general-info {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.general-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.general-info h3 {
    background: #626A59;
    color: white;
    padding: 12px 20px;
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.general-info-content {
    padding: 30px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.info-left {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-right {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-field label {
    font-weight: 600;
    color: #626A59;
    font-size: 0.95rem;
    line-height: 1.4;
}

.info-field input {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: white;
    color: #2d3748;
    transition: all 0.3s ease;
    width: 100%;
}

.info-field input:focus {
    outline: none;
    border-color: #626A59;
    box-shadow: 0 0 0 3px rgba(98, 106, 89, 0.1);
}

.info-field input::placeholder {
    color: #a0aec0;
    font-style: italic;
}

/* Planning Grid - converted to form sections */
.planning-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 40px;
}

.planning-box {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 0;
}

.planning-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.planning-box h3 {
    background: #626A59;
    color: white;
    padding: 12px 20px;
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.planning-box-content {
    padding: 20px;
    min-width: 0;
}

/* Schedule Items */
.schedule-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0;
}

.schedule-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 15px;
    align-items: center;
}

.time-input {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: white;
    color: #2d3748;
    text-align: center;
    transition: all 0.3s ease;
    width: 140px;
    min-width: 140px;
    flex-shrink: 0;
}

.schedule-text {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: white;
    color: #2d3748;
    transition: all 0.3s ease;
    width: 100%;
}

.time-input:focus,
.schedule-text:focus {
    outline: none;
    border-color: #626A59;
    box-shadow: 0 0 0 3px rgba(98, 106, 89, 0.1);
}

.time-input::placeholder,
.schedule-text::placeholder {
    color: #a0aec0;
    font-style: italic;
}

/* Todo Items */
.todo-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.todo-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid #C6CBCA;
    border-radius: 4px;
    cursor: pointer;
    accent-color: #626A59;
}

.todo-item label {
    flex: 1;
    cursor: pointer;
}

.todo-text {
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: white;
    color: #2d3748;
    transition: all 0.3s ease;
}

.todo-text:focus {
    outline: none;
    border-color: #626A59;
    box-shadow: 0 0 0 3px rgba(98, 106, 89, 0.1);
}

.todo-text::placeholder {
    color: #a0aec0;
    font-style: italic;
}

/* Decor Items */
.decor-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.decor-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.decor-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid #C6CBCA;
    border-radius: 4px;
    cursor: pointer;
    accent-color: #626A59;
}

.decor-item label {
    flex: 1;
    cursor: pointer;
}

.decor-text {
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: white;
    color: #2d3748;
    transition: all 0.3s ease;
}

.decor-text:focus {
    outline: none;
    border-color: #626A59;
    box-shadow: 0 0 0 3px rgba(98, 106, 89, 0.1);
}

.decor-text::placeholder {
    color: #a0aec0;
    font-style: italic;
}

/* Entertainment Items */
.entertainment-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.entertainment-item {
    width: 100%;
}

.entertainment-text {
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: white;
    color: #2d3748;
    transition: all 0.3s ease;
}

.entertainment-text:focus {
    outline: none;
    border-color: #626A59;
    box-shadow: 0 0 0 3px rgba(98, 106, 89, 0.1);
}

.entertainment-text::placeholder {
    color: #a0aec0;
    font-style: italic;
}

/* Notes Section */
.notes-section {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.notes-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.notes-section h3 {
    background: #626A59;
    color: white;
    padding: 12px 20px;
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notes-section h3::before {
    content: '📝';
    font-size: 1.2rem;
}

.notes-content {
    padding: 20px;
}

.notes-section textarea {
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: white;
    color: #2d3748;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
}

.notes-section textarea:focus {
    outline: none;
    border-color: #626A59;
    box-shadow: 0 0 0 3px rgba(98, 106, 89, 0.1);
}

.notes-section textarea::placeholder {
    color: #a0aec0;
    font-style: italic;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 40px 30px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin-top: 40px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    min-width: 140px;
    justify-content: center;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: #626A59;
    color: white;
}

.btn-primary:hover {
    background: #9AA497;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(98, 106, 89, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #626A59;
    border: 2px solid #626A59;
}

.btn-secondary:hover {
    background: #626A59;
    color: white;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #626A59;
    border: 2px solid #626A59;
}

.btn-outline:hover {
    background: #626A59;
    color: white;
    transform: translateY(-2px);
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .wedding-form {
        padding: 20px;
    }

    .form-header {
        padding: 30px 20px;
    }

    .form-header h1 {
        font-size: 2rem;
    }

    .general-info-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .planning-box-content {
        padding: 20px;
    }

    .notes-content {
        padding: 20px;
    }

    .wedding-title {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .couple-names-input {
        min-width: 250px;
    }

    .schedule-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .time-input {
        width: 100%;
        min-width: auto;
    }

    .form-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .back-link {
        position: static;
        margin-bottom: 20px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .form-header h1 {
        font-size: 1.8rem;
    }

    .form-header p {
        font-size: 1rem;
    }

    .planning-box h3 {
        font-size: 1.2rem;
        padding: 15px 20px;
    }

    .planning-box-content {
        padding: 15px;
    }

    .notes-content {
        padding: 15px;
    }

    .script-text {
        font-size: 1.2rem;
    }

    .couple-names-input {
        min-width: 200px;
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    /* Hide non-essential elements */
    .form-header,
    .form-actions,
    .back-link {
        display: none !important;
    }

    /* Remove body padding and set compact font */
    body {
        background: white !important;
        color: black !important;
        font-size: 10pt !important;
        line-height: 1.3 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Compact form container */
    .form-container {
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    .wedding-form {
        padding: 10pt !important;
    }

    /* Compact wedding header */
    .wedding-header {
        margin-bottom: 15pt !important;
        border: 1px solid #000 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .wedding-title {
        background: #8B7355 !important;
        color: white !important;
        padding: 8pt 12pt !important;
        font-size: 14pt !important;
        margin: 0 !important;
    }

    .couple-names-input {
        background: transparent !important;
        border: none !important;
        border-bottom: 1px solid white !important;
        color: white !important;
        font-size: 14pt !important;
        padding: 2pt 4pt !important;
        margin: 0 4pt !important;
    }

    /* Compact general info */
    .general-info {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #000 !important;
        border-radius: 0 !important;
        margin-bottom: 15pt !important;
    }

    .general-info h3 {
        background: #8B7355 !important;
        color: white !important;
        font-size: 10pt !important;
        padding: 4pt 6pt !important;
        margin: 0 !important;
    }

    .general-info-content {
        padding: 8pt !important;
    }

    .info-field {
        margin-bottom: 6pt !important;
    }

    .info-field label {
        font-size: 9pt !important;
        font-weight: bold !important;
        margin-bottom: 2pt !important;
    }

    .info-field input {
        border: none !important;
        border-bottom: 1px solid #000 !important;
        background: transparent !important;
        padding: 1pt 2pt !important;
        font-size: 10pt !important;
        width: 100% !important;
    }

    /* Compact planning grid - make 2 columns for better space usage */
    .planning-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10pt !important;
        margin-bottom: 15pt !important;
    }

    .planning-box {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #000 !important;
        border-radius: 0 !important;
        margin-bottom: 0 !important;
    }

    .planning-box h3 {
        background: #8B7355 !important;
        color: white !important;
        font-size: 10pt !important;
        padding: 4pt 6pt !important;
        margin: 0 !important;
    }

    .planning-box-content {
        padding: 6pt !important;
    }

    /* Compact schedule items */
    .schedule-item {
        margin-bottom: 3pt !important;
        display: flex !important;
        gap: 4pt !important;
        align-items: center !important;
    }

    .time-input {
        width: 80px !important;
        min-width: 80px !important;
        font-size: 9pt !important;
        padding: 1pt !important;
        border: none !important;
        border-bottom: 1px solid #000 !important;
        background: transparent !important;
        flex-shrink: 0 !important;
    }

    .schedule-text {
        flex: 1 !important;
        font-size: 9pt !important;
        padding: 1pt !important;
        border: none !important;
        border-bottom: 1px solid #000 !important;
        background: transparent !important;
    }

    /* Compact todo items */
    .todo-item {
        margin-bottom: 2pt !important;
        display: flex !important;
        align-items: center !important;
        gap: 4pt !important;
    }

    .todo-item input[type="checkbox"] {
        margin: 0 !important;
        width: 10pt !important;
        height: 10pt !important;
    }

    .todo-text {
        flex: 1 !important;
        font-size: 9pt !important;
        padding: 1pt !important;
        border: none !important;
        border-bottom: 1px solid #000 !important;
        background: transparent !important;
    }

    /* Compact decor items */
    .decor-item {
        margin-bottom: 2pt !important;
        display: flex !important;
        align-items: center !important;
        gap: 4pt !important;
    }

    .decor-item input[type="checkbox"] {
        margin: 0 !important;
        width: 10pt !important;
        height: 10pt !important;
    }

    .decor-text {
        flex: 1 !important;
        font-size: 9pt !important;
        padding: 1pt !important;
        border: none !important;
        border-bottom: 1px solid #000 !important;
        background: transparent !important;
    }

    /* Compact entertainment items */
    .entertainment-item {
        margin-bottom: 2pt !important;
    }

    .entertainment-text {
        width: 100% !important;
        font-size: 9pt !important;
        padding: 1pt !important;
        border: none !important;
        border-bottom: 1px solid #000 !important;
        background: transparent !important;
    }

    /* Compact notes section */
    .notes-section {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #000 !important;
        border-radius: 0 !important;
        margin-bottom: 15pt !important;
    }

    .notes-section h3 {
        background: #8B7355 !important;
        color: white !important;
        font-size: 10pt !important;
        padding: 4pt 6pt !important;
        margin: 0 !important;
    }

    .notes-content {
        padding: 6pt !important;
    }

    .notes-content textarea {
        width: 100% !important;
        font-size: 9pt !important;
        padding: 2pt !important;
        border: none !important;
        border-bottom: 1px solid #000 !important;
        background: transparent !important;
        resize: none !important;
        min-height: 60pt !important;
    }

    /* Remove focus styles and animations */
    * {
        transition: none !important;
        animation: none !important;
        box-shadow: none !important;
    }

    /* Ensure proper page breaks */
    .planning-box:nth-child(1),
    .planning-box:nth-child(2) {
        page-break-after: avoid;
    }

    .planning-box:nth-child(3),
    .planning-box:nth-child(4) {
        page-break-before: avoid;
    }

    /* Hide empty planning box emojis for cleaner print */
    .planning-box h3:before {
        display: none !important;
    }
}

/* Focus styles for accessibility */
input:focus,
textarea:focus {
    outline: none !important;
}

/* Smooth transitions */
* {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Required field indicator */
.field.required label::after {
    content: ' *';
    color: #e53e3e;
}

/* Form validation styles */
.field.error input,
.field.error textarea {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.field.success input,
.field.success textarea {
    border-color: #38a169;
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.1);
}

/* Enhanced visual hierarchy */
.planning-box:first-child {
    margin-top: 0;
}

.planning-box:last-child {
    margin-bottom: 0;
}

/* Improved button group styling */
.form-actions .btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Section icons */
.planning-box h3:before {
    font-size: 1.2rem;
    margin-right: 8px;
}

.planning-box:nth-child(1) h3:before {
    content: '📅';
}

.planning-box:nth-child(2) h3:before {
    content: '✅';
}

.planning-box:nth-child(3) h3:before {
    content: '🎨';
}

.planning-box:nth-child(4) h3:before {
    content: '🎵';
}