/* ============================================
   T Y Creation - Main Stylesheet
   ============================================ */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header .header-logo {
    max-height: 60px;
    margin-right: 20px;
    vertical-align: middle;
}

header h1 {
    display: inline-block;
    margin: 0;
    font-size: 2em;
    font-weight: 600;
    vertical-align: middle;
}

header nav {
    float: right;
    margin-top: 15px;
}

header nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

header nav a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Main Container */
.main-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.content-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 420px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Form Container */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.form-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.form-icon {
    width: 80px;
    height: 80px;
    cursor: pointer;
    transition: transform 0.3s;
    margin-bottom: 15px;
}

.form-icon:hover {
    transform: scale(1.1);
}

.form-container p {
    font-size: 1.1em;
    color: #555;
    margin-top: 10px;
}

/* Login Container */
.login-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-container h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    text-align: center;
}

.login-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-container input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.login-container input:focus {
    outline: none;
    border-color: #2c3e50;
}

.login-container button {
    background-color: #2c3e50;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-container button:hover {
    background-color: #1a252f;
}

/* Contact Info */
.contact-info {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 1.1em;
}

.map-container {
    margin: 20px 0;
    text-align: center;
}

.map-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 2px solid #ddd;
}

.whatsapp-link {
    display: inline-block;
    background-color: #25D366;
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 6px;
    margin-top: 15px;
    transition: background-color 0.3s;
}

.whatsapp-link:hover {
    background-color: #20BA5A;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

footer p {
    margin: 0;
}

/* ============================================
   Modal Styles
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

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

.modal-content {
    background-color: #fefefe;
    margin: 3% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideDown 0.3s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

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

.close-btn {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #000;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #2c3e50;
    padding-bottom: 10px;
}

/* ============================================
   Form Sections
   ============================================ */

.form-section {
    background-color: #f9f9f9;
    padding: 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.form-section h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Double Line Divider */
.section-divider {
    height: 6px;
    margin: 25px 0;
    border-top: 1px double #ddd;
    border-bottom: 1px double #eee;
    background: linear-gradient(to right, transparent, #ccc 20%, #ccc 80%, transparent);
}

/* Form Group */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #444;
    font-size: 0.95em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.form-group input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* Table Styling */
.garment-table-container {
    margin: 20px 0;
    overflow-x: auto;
}

#garment-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    font-size: 0.95em;
    background: white;
}

#garment-table th, #garment-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

#garment-table th {
    background-color: #f2f2f2;
    font-weight: 600;
    color: #333;
}

#garment-table tr:hover {
    background-color: #f9f9f9;
}

#garment-table td input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Buttons */
#add-item-btn {
    background-color: #2c3e50;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95em;
    margin: 5px 0;
    transition: background-color 0.3s;
}

#add-item-btn:hover {
    background-color: #1a252f;
}

.delete-row-btn {
    background-color: #e74c3c;
    color: white;
    font-size: 16px;
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.delete-row-btn:hover {
    background-color: #c0392b;
}

/* File Upload */
.file-upload-group {
    margin: 20px 0;
}

.file-info {
    font-size: 0.85em;
    color: #555;
    margin: 5px 0;
    line-height: 1.5;
}

.file-upload-group input[type="file"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 100%;
    background: white;
}

/* Submit Button */
#orderForm button[type="submit"] {
    background-color: #e74c3c;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    margin-top: 15px;
    width: 100%;
    transition: background-color 0.3s;
    font-weight: 600;
}

#orderForm button[type="submit"]:hover {
    background-color: #c0392b;
}

/* Animated Character */
.animated-character {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.3);
    font-size: 40px;
    animation: float 3s ease-in-out infinite;
    cursor: help;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 2px solid #f0f0f0;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0); }
}

/* Loading Overlay */
#loadingOverlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e74c3c;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

/* Alert Messages */
.alert {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
}

.alert ul {
    margin: 0;
    padding-left: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5em;
    }

    .main-container {
        margin: 20px auto;
        padding: 0 15px;
    }

    .form-container,
    .login-container,
    .contact-info {
        padding: 20px;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 20px;
    }

    .animated-character {
        font-size: 22px;
        top: 12px;
        right: 12px;
    }

    .form-section {
        padding: 12px;
    }

    #garment-table th, #garment-table td {
        padding: 6px;
        font-size: 0.85em;
    }

    .delete-row-btn {
        font-size: 14px;
        padding: 3px 8px;
    }
}

@media (max-width: 600px) {
    header {
        text-align: center;
        padding: 15px 0;
    }

    header .header-logo {
        margin: 0 auto 10px;
        display: block;
    }

    header h1 {
        display: block;
        font-size: 1.3em;
    }

    header nav {
        float: none;
        text-align: center;
        margin-top: 10px;
    }

    header nav a {
        margin: 0 5px;
        padding: 5px 10px;
    }

    .content-left {
        gap: 20px;
    }

    .modal-content {
        width: 98%;
        padding: 15px;
    }

    .section-divider {
        margin: 15px 0;
    }
}

/* Print Styles */
@media print {
    .modal {
        display: none;
    }

    header nav,
    .form-container,
    .login-container {
        display: none;
    }
}