/* ============================================
   UPLOAD & MY PLATES MODALS
   Upload plate form + my plates listing
   ============================================ */

/* ---- Upload Plate Button ---- */
.upload-plate-btn {
    background-color: #8B0000;
    color: white;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(139, 0, 0, 0.3);
    position: relative;
}

.upload-plate-btn::before {
    content: "+";
    font-weight: 400;
}

.upload-plate-btn:hover {
    background-color: #a50000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(139, 0, 0, 0.4);
}

.upload-plate-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(139, 0, 0, 0.3);
}

/* Tooltip */
.upload-plate-btn::after {
    content: "Upload Plate";
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 12px;
    font-weight: normal;
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.upload-plate-btn:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---- Upload Modal ---- */
.upload-plate-modal {
    position: fixed;
    inset: 0;
    z-index: 950;
    display: none;
    align-items: center;
    justify-content: center;
}

.upload-plate-modal.active {
    display: flex;
}

.upload-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.upload-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    padding: 25px;
    overflow-y: auto;
    z-index: 1;
}

.close-upload {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
}

.upload-content h2 {
    margin: 0 0 20px;
    color: var(--primary-color, #8B0000);
    font-size: 24px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

/* ---- Upload Form ---- */
.upload-plate-form .form-group {
    margin-bottom: 20px;
}

.upload-plate-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #444;
}

.upload-plate-form input[type="text"],
.upload-plate-form input[type="number"],
.upload-plate-form input[type="tel"],
.upload-plate-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.upload-plate-form input:focus,
.upload-plate-form textarea:focus {
    border-color: var(--primary-color, #8B0000);
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.upload-box {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.3s;
}

.upload-box:hover {
    border-color: #bbb;
}

.select-photo-btn {
    background-color: #f5f5f5;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.select-photo-btn:hover {
    background-color: #e5e5e5;
}

.photo-preview {
    display: none;
    margin-top: 15px;
    max-width: 100%;
    text-align: center;
}

.photo-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    object-fit: contain;
}

.upload-submit-btn {
    background: linear-gradient(to right, #8B0000, #a50000);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 25px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.upload-submit-btn:hover {
    background: linear-gradient(to right, #a50000, #c10000);
    transform: translateY(-2px);
}

/* ---- My Plates Modal ---- */
.my-plates-modal {
    position: fixed;
    inset: 0;
    z-index: 950;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.my-plates-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.my-plates-modal.closing {
    opacity: 0;
}

.my-plates-modal .modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.my-plates-modal .modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.25s ease-out;
    z-index: 1;
}

.my-plates-modal.active .modal-content {
    transform: translateY(0);
}

.my-plates-modal .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.my-plates-modal .modal-header h3 {
    margin: 0;
    color: var(--primary-color, #8B0000);
    font-size: 20px;
}

.my-plates-modal .modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0 8px;
    color: #555;
}

.my-plates-modal .modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 60px);
}

.my-plates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.no-plates {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* ---- Plate Owner Actions ---- */
.plate-owner-actions {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    border-top: 1px solid #eee;
}

.edit-plate-btn,
.delete-plate-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.edit-plate-btn {
    background-color: #f0f0f0;
    color: #333;
    flex: 1;
}

.delete-plate-btn {
    background-color: #fff1f1;
    color: #e74c3c;
}

.edit-plate-btn:hover {
    background-color: #e0e0e0;
}

.delete-plate-btn:hover {
    background-color: #ffe5e5;
}
