/**
 * Media Replace Module Styles
 */

.dailybuddy-media-replace {
    margin: 20px 20px 20px 0;
}

.dailybuddy-replace-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

@media (max-width: 960px) {
    .dailybuddy-replace-container {
        grid-template-columns: 1fr;
    }
}

/* Current File Section */
.dailybuddy-current-file {
    background: #fff;
    padding: 25px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dailybuddy-current-file h2 {
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #dcdcde;
    font-size: 18px;
}

.file-preview {
    text-align: center;
    padding: 20px;
    background: #f6f7f7;
    border-radius: 4px;
    margin: 20px 0;
}

.file-preview img {
    border-radius: 4px;
    display: inline-block;
}

.file-icon {
    font-size: 80px;
    color: #a7aaad;
}

.file-icon .dashicons {
    width: 80px;
    height: 80px;
    font-size: 80px;
}

.file-details {
    margin-top: 20px;
}

.file-details .form-table {
    margin: 0;
}

.file-details th {
    font-weight: 600;
    padding: 10px 15px 10px 0;
    width: 120px;
}

.file-details td {
    padding: 10px 0;
}

.file-details code {
    background: #f6f7f7;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 13px;
}

/* Replace Form Section */
.dailybuddy-replace-form {
    background: #fff;
    padding: 25px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dailybuddy-replace-form h2 {
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #dcdcde;
    font-size: 18px;
}

.upload-field {
    margin: 25px 0;
    padding: 30px;
    background: #f6f7f7;
    border: 2px dashed #c3c4c7;
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s ease;
}

.upload-field:hover {
    border-color: #2271b1;
    background: #f0f6fc;
}

.upload-field label {
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.upload-field label .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

#file-chosen {
    display: block;
    margin-top: 15px;
    color: #50575e;
    font-size: 14px;
}

.replace-options {
    margin: 25px 0;
    padding: 20px;
    background: #f6f7f7;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
}

.replace-options h3 {
    margin-top: 0;
    font-size: 15px;
    color: #2271b1;
}

.replace-options .description {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    font-size: 13px;
    line-height: 1.6;
}

.replace-options .description .dashicons {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    font-size: 20px;
}

.replace-options .description .dashicons-info {
    color: #2271b1;
}

.replace-options .description .dashicons-warning {
    color: #d63638;
}

.submit-actions {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #dcdcde;
    display: flex;
    gap: 10px;
    align-items: center;
}

.submit-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.submit-actions .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Progress Bar */
#upload-progress {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #dcdcde;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #f0f0f1;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1 0%, #135e96 100%);
    width: 0;
    animation: progress 2s ease-in-out infinite;
    border-radius: 15px;
}

@keyframes progress {
    0% {
        width: 0%;
    }

    50% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
    color: #2271b1;
}

/* Success Message */
.notice.dailybuddy-replaced {
    border-left-color: #00a32a;
}

.notice.dailybuddy-replaced .dashicons {
    color: #00a32a;
}

/* Media Library Integration */
.row-actions .dailybuddy_replace a {
    color: #2271b1;
}

.row-actions .dailybuddy_replace a:hover {
    color: #135e96;
}

/* Attachment Details Modal */
.compat-field-dailybuddy_replace {
    padding: 15px 0;
}

.compat-field-dailybuddy_replace th {
    padding-right: 10px;
}

.compat-field-dailybuddy_replace .button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}