/**
 * PendingMessage Editor Styles - Mit Text-Best&auml;tigung
 * 
 * @package PendingMessage
 * @since 1.0.3
 */

/* Container */
.pm-editor-wrapper {
    max-width: 900px;
    margin: 20px auto;
    padding: 0;
}

/* Progress Bar */
.pm-progress {
    display: flex;
    justify-content: space-between;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pm-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.pm-step.pm-active, .pm-step.pm-completed {
    opacity: 1;
}

.pm-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    transition: all 0.3s;
}

.pm-step.pm-active .pm-num {
    background: #007bff;
    border-color: #007bff;
    color: #fff;
}

.pm-step.pm-completed .pm-num {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}

.pm-label {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    color: #666;
}

/* Step Content */
.pm-step-content {
    display: none;
}

.pm-step-content.pm-active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Step 2 Phases */
.pm-step-2-phase {
    display: none;
}

.pm-step-2-phase.pm-active {
    display: block;
}

/* Card Design */
.pm-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.pm-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.pm-card-header h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
}

.pm-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.pm-card-body {
    padding: 30px;
}

.pm-card-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.pm-footer-split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

/* Editor Container */
.pm-editor-container {
    margin-bottom: 20px;
}

.pm-editor-container .wp-editor-wrap {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.pm-editor-container .wp-editor-wrap:focus-within {
    border-color: #007bff;
}

/* Status Badge */
.pm-status-badge {
    padding: 12px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pm-status-badge.approved {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.pm-status-badge.rejected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Preview Area */
.pm-preview-area {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
}

.pm-preview-area h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.pm-preview-content {
    background: white;
    padding: 15px;
    border-radius: 6px;
    line-height: 1.6;
}

/* Buttons */
.pm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.pm-btn-large {
    padding: 14px 30px;
    font-size: 16px;
}

.pm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pm-btn-primary {
    background: #007bff;
    color: #fff;
}

.pm-btn-primary:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.pm-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.pm-btn-secondary:hover:not(:disabled) {
    background: #545b62;
}

.pm-btn-success {
    background: #28a745;
    color: #fff;
}

.pm-btn-success:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.pm-icon {
    font-size: 16px;
}

/* Step 2: Anlass-Auswahl */
.pm-box-label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    font-size: 14px;
}

.pm-text-display {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    line-height: 1.6;
    max-height: 200px;
    overflow-y: auto;
}

.pm-text-large {
    font-size: 15px;
    max-height: 300px;
    padding: 20px;
}

.pm-occasion-options {
    margin: 30px 0;
}

.pm-option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.pm-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 25px 15px;
    background: white;
    border: 3px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.pm-option-btn:hover {
    border-color: #007bff;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.pm-option-btn.active {
    border-color: #007bff;
    background: #e7f1ff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.pm-option-icon {
    font-size: 40px;
}

.pm-option-label {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

/* Eigener Anlass */
.pm-custom-occasion {
    margin-top: 25px;
}

.pm-text-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.pm-text-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Anlass-Anzeige */
.pm-occasion-display {
    background: #e7f1ff;
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pm-occasion-display .pm-occasion-icon {
    font-size: 32px;
}

.pm-occasion-display .pm-occasion-text {
    font-size: 16px;
    font-weight: 600;
    color: #007bff;
}

/* Finaler Text */
.pm-final-text-box {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
}

/* Entscheidungs-Info */
.pm-decision-info {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
}

.pm-decision-info p {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: #856404;
}

.pm-decision-info ul {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.pm-decision-info li {
    margin: 8px 0;
    font-size: 14px;
    color: #856404;
}

/* Step 3: Bilder */
.pm-upload-area {
    border: 3px dashed #dee2e6;
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8f9fa;
}

.pm-upload-area:hover {
    border-color: #007bff;
    background: #e7f1ff;
}

.pm-upload-placeholder {
    color: #6c757d;
}

.pm-upload-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.pm-upload-placeholder p {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.pm-upload-placeholder small {
    font-size: 13px;
    color: #999;
}

.pm-image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.pm-image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e9ecef;
    background: #f8f9fa;
}

.pm-image-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.pm-image-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.95);
    color: white;
    border: 2px solid white;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pm-image-remove:hover {
    background: rgb(220, 53, 69);
}

.pm-image-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Upload Progress */
.pm-upload-progress {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.pm-progress-bar {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.pm-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 15px;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 12px;
}

.pm-progress-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Loading State */
.pm-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .pm-editor-wrapper {
        padding: 10px;
    }
    
    .pm-progress {
        padding: 10px;
    }
    
    .pm-label {
        font-size: 10px;
    }
    
    .pm-card-header {
        padding: 20px;
    }
    
    .pm-card-header h3 {
        font-size: 20px;
    }
    
    .pm-card-body {
        padding: 20px;
    }
    
    .pm-option-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pm-footer-split {
        flex-direction: column;
        gap: 10px;
    }
    
    .pm-footer-split .pm-btn {
        width: 100%;
    }
}