/* =========================================
   UPLOAD DESIGN MODAL
   ========================================= */
.upload-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    backdrop-filter: blur(3px);
}
.upload-modal-overlay.active { display: flex; }

.upload-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 1020px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    display: grid;
    grid-template-columns: 0.4fr 0.6fr;
    animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Left Column: Guidelines */
.modal-left {
    background: #f9f9f9;
    padding: 2rem 1.75rem;
    border-radius: 16px 0 0 16px;
    overflow-y: auto;
}
.modal-left h2 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    color: #1a1a2e;
}
.modal-left .modal-subtitle {
    font-size: 0.82rem;
    color: #888;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}
.modal-template-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.modal-template-card h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #333;
}
.modal-template-card p {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}
.modal-template-card a {
    color: #0056b3;
    font-weight: 600;
    font-size: 0.82rem;
    text-decoration: underline;
}
.modal-section-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.4rem;
    margin-top: 0.25rem;
}
.modal-section-text {
    font-size: 0.8rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}
.modal-section-text a {
    color: #0056b3;
    text-decoration: underline;
    font-weight: 500;
}
.modal-section-text ol {
    padding-left: 1.2rem;
    margin: 0.4rem 0 0;
    list-style: decimal;
}
.modal-section-text ol li {
    margin-bottom: 0.3rem;
    list-style: decimal;
}

/* Right Column: Upload Area */
.modal-right {
    padding: 2rem 2rem 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
}
.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: all 0.2s;
}
.modal-close-btn:hover { background: #e5e7eb; color: #000; }

.modal-right h2 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    color: #1a1a2e;
    padding-right: 2.5rem;
}
.modal-right .modal-subtitle {
    font-size: 0.82rem;
    color: #888;
    margin-bottom: 1.25rem;
}
.modal-field-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.4rem;
    display: block;
}
.modal-field-label .required { color: #d32f2f; }
.modal-project-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    transition: border-color 0.2s;
    font-family: inherit;
}
.modal-project-input:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 0 3px rgba(0,86,179,0.1);
}
.upload-zone-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    display: block;
}
.upload-zone {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 1.75rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1.25rem;
    background: #fdfdfd;
}
.upload-zone:hover { border-color: #0056b3; background: #f0f7ff; }
.upload-zone.has-file { border-color: #27ae60; background: #f0fdf4; }
.upload-zone-icon {
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
    display: block;
    color: #aaa;
}
.upload-zone.has-file .upload-zone-icon { color: #27ae60; }
.upload-zone-text {
    font-size: 0.88rem;
    color: #555;
}
.upload-zone-text .browse-link {
    color: #0056b3;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}
.upload-zone-formats {
    font-size: 0.72rem;
    color: #aaa;
    margin-top: 0.4rem;
    display: block;
}
.upload-zone .file-name-display {
    font-size: 0.9rem;
    font-weight: 600;
    color: #27ae60;
    word-break: break-all;
}

.modal-continue-btn {
    width: 100%;
    padding: 0.95rem;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: auto;
    transition: background 0.2s, transform 0.15s;
}
.modal-continue-btn:hover { background: #333; transform: translateY(-1px); }

/* =========================================
   GLOBAL ARTWORK UPLOAD MODAL (#upload-design-modal)
   ========================================= */
.udm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}
.udm-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.udm-box {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    transform: translateY(16px) scale(0.97);
    transition: transform .3s ease;
}
.udm-overlay.active .udm-box {
    transform: translateY(0) scale(1);
}
.udm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #eee;
}
.udm-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0;
}
.udm-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: background .2s;
}
.udm-close:hover { background: #e5e7eb; color: #000; }
.udm-body {
    padding: 1.5rem;
}
.udm-drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    background: #fdfdfd;
    transition: border-color .2s, background .2s;
}
.udm-drop-zone:hover,
.udm-drop-zone.drag-over {
    border-color: #0056b3;
    background: #f0f7ff;
}
.udm-drop-zone.has-file {
    border-color: #27ae60;
    background: #f0fdf4;
}
.udm-upload-icon { margin-bottom: 0.5rem; }
.udm-drop-zone.has-file .udm-upload-icon stroke { stroke: #27ae60; }
.udm-drop-text {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.25rem;
}
.udm-drop-formats {
    font-size: 0.73rem;
    color: #aaa;
}
.udm-file-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #27ae60;
    margin: 0.6rem 0 0;
    min-height: 1.2em;
    word-break: break-all;
}
.udm-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin: 1.25rem 0 0.4rem;
}
.udm-textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 0.88rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color .2s;
    box-sizing: border-box;
}
.udm-textarea:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 0 3px rgba(0,86,179,0.1);
}
.udm-footer {
    padding: 0 1.5rem 1.5rem;
}
.udm-confirm-btn {
    width: 100%;
    padding: 0.9rem;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
}
.udm-confirm-btn:hover {
    background: #333;
    transform: translateY(-1px);
}
