/* Print Partner Manager - Modern Public Styles */

/* Modern Form Container */
.ppm-form-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.ppm-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
}

.ppm-form-container > * {
    position: relative;
    z-index: 1;
}

/* Form Title */
.ppm-form-container h3 {
    text-align: center;
    margin-bottom: 40px;
    color: #2d3748;
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Form Groups */
.ppm-form-group {
    margin-bottom: 25px;
    position: relative;
}

.ppm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
    font-size: 16px;
    transition: color 0.3s ease;
}

.ppm-form-group input,
.ppm-form-group select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    background: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ppm-form-group input:focus,
.ppm-form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

/* Custom Size Fields */
#custom-size-fields {
    background: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    margin-top: 15px;
}

.ppm-size-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.pmp-price-note {
    margin-top: 10px;
    color: #718096;
    font-style: italic;
    font-size: 14px;
}

/* File Upload Styling */
.ppm-form-group input[type="file"] {
    padding: 12px;
    border: 2px dashed #cbd5e0;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ppm-form-group input[type="file"]:hover {
    border-color: #667eea;
    background: #edf2f7;
}

.ppm-file-info {
    margin-top: 8px;
    color: #718096;
    font-size: 14px;
}

/* Photo Preview */
.ppm-photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 20px 0;
    justify-content: flex-start;
}

.ppm-photo-item {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(102,126,234,0.10), 0 1.5px 4px rgba(0,0,0,0.04);
    overflow: hidden;
    position: relative;
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px 12px 8px;
    transition: transform 0.18s, box-shadow 0.18s;
}

.ppm-photo-item:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 8px 24px rgba(102,126,234,0.18), 0 2px 8px rgba(0,0,0,0.08);
}

.ppm-photo-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(102,126,234,0.08);
}

.ppm-photo-name {
    font-size: 13px;
    color: #222;
    text-align: center;
    word-break: break-all;
    margin-bottom: 2px;
    font-weight: 500;
}

.ppm-photo-remove {
    position: absolute;
    top: 7px;
    right: 7px;
    background: linear-gradient(135deg, #ef4444 60%, #f093fb 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239,68,68,0.10);
    opacity: 0.85;
    transition: background 0.2s, opacity 0.2s, transform 0.15s;
    z-index: 2;
}

.ppm-photo-remove:hover {
    background: linear-gradient(135deg, #f5576c 60%, #f093fb 100%);
    opacity: 1;
    transform: scale(1.12);
}

/* Price Summary */
.ppm-price-summary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 25px;
    border-radius: 16px;
    color: white;
    margin: 30px 0;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.ppm-price-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
}

.ppm-price-total {
    border-top: 2px solid rgba(255,255,255,0.3);
    padding-top: 15px;
    margin-top: 15px;
    font-size: 20px;
    font-weight: 700;
}

/* Submit Button */
.ppm-form-actions {
    text-align: center;
    margin-top: 30px;
}

.ppm-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ppm-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.4);
}

.ppm-btn-primary:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Message Display */
.ppm-message {
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    text-align: center;
    font-weight: 600;
    animation: slideIn 0.5s ease;
}

.ppm-message.success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(72, 187, 120, 0.3);
}

.ppm-message.error {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(245, 101, 101, 0.3);
}

/* Sede Status Indicator */
.sede-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sede-status.active {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.sede-status.inactive {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
}

.sede-status.unknown {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    color: white;
}

/* Sede Info Text */
.ppm-sede-info {
    margin-top: 10px;
    color: #718096;
    font-size: 14px;
    font-style: italic;
    padding: 10px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

/* Printing Form Specific Styles */
.ppm-printing-form {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ppm-printing-form h3 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Form Sections */
.ppm-form-section {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.ppm-form-section h4 {
    margin: 0 0 20px 0;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

/* Form Rows */
.ppm-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.ppm-form-row .ppm-form-group:last-child {
    margin-bottom: 0;
}

/* Enhanced Form Groups for Printing */
.ppm-printing-form .ppm-form-group {
    margin-bottom: 20px;
}

.ppm-printing-form .ppm-form-group label {
    color: #4a5568;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.ppm-printing-form .ppm-form-group input,
.ppm-printing-form .ppm-form-group select,
.ppm-printing-form .ppm-form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ppm-printing-form .ppm-form-group input:focus,
.ppm-printing-form .ppm-form-group select:focus,
.ppm-printing-form .ppm-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.ppm-printing-form .ppm-form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* File Preview for Printing */
.ppm-file-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.ppm-file-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.ppm-file-item:hover {
    transform: translateY(-2px);
}

.ppm-file-icon {
    font-size: 2em;
    margin-bottom: 10px;
    color: #667eea;
}

.ppm-file-name {
    font-size: 12px;
    color: #4a5568;
    word-break: break-word;
    margin-bottom: 5px;
}

.ppm-file-size {
    font-size: 11px;
    color: #718096;
}

.ppm-file-remove {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 10px;
    margin-top: 5px;
}

/* Enhanced Price Summary for Printing */
.ppm-printing-form .ppm-price-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 16px;
    margin: 30px 0;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.ppm-printing-form .ppm-price-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 16px;
}

.ppm-printing-form .ppm-price-total {
    border-top: 2px solid rgba(255,255,255,0.3);
    padding-top: 15px;
    margin-top: 15px;
    font-size: 22px;
    font-weight: 700;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Animation */
.ppm-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .ppm-form-container {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .ppm-form-container h3 {
        font-size: 24px;
    }
    
    .ppm-size-inputs {
        grid-template-columns: 1fr;
    }
    
    .ppm-photo-preview {
        gap: 10px;
        justify-content: center;
    }
    
    .ppm-btn-primary {
        padding: 16px 30px;
        font-size: 16px;
    }
    
    .sede-status {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .ppm-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .ppm-form-section {
        padding: 20px;
    }
    
    .ppm-file-preview {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .ppm-printing-form .ppm-price-summary {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .ppm-form-container {
        margin: 10px;
        padding: 20px 15px;
    }
    
    .ppm-form-container h3 {
        font-size: 20px;
    }
    
    .ppm-price-summary {
        padding: 20px;
    }
    
    .ppm-price-line {
        font-size: 14px;
    }
    
    .ppm-price-total {
        font-size: 18px;
    }
    
    .ppm-form-group input,
    .ppm-form-group select {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .ppm-form-section {
        padding: 15px;
    }
    
    .ppm-form-section h4 {
        font-size: 16px;
    }
    
    .ppm-printing-form .ppm-form-group input,
    .ppm-printing-form .ppm-form-group select,
    .ppm-printing-form .ppm-form-group textarea {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .ppm-file-preview {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .ppm-printing-form .ppm-price-summary {
        padding: 20px;
    }
    
    .ppm-printing-form .ppm-price-line {
        font-size: 14px;
    }
    
    .ppm-printing-form .ppm-price-total {
        font-size: 18px;
    }
}

@media (max-width: 600px) {
    .ppm-photo-item {
        width: 90px;
        min-width: 90px;
        max-width: 90px;
        padding: 7px 4px 8px 4px;
    }
    .ppm-photo-item img {
        height: 55px;
    }
    .ppm-photo-name {
        font-size: 11px;
    }
    .ppm-photo-remove {
        width: 18px;
        height: 18px;
        font-size: 12px;
        top: 4px;
        right: 4px;
    }
}

/* Cambia el color de la letra del formulario a negro */
.ppm-form-container,
.ppm-form-container label,
.ppm-form-container input,
.ppm-form-container select,
.ppm-form-container textarea,
.ppm-form-container .ppm-form-group,
.ppm-form-container .ppm-price-summary,
.ppm-form-container h3,
.ppm-printing-form,
.ppm-printing-form label,
.ppm-printing-form input,
.ppm-printing-form select,
.ppm-printing-form textarea,
.ppm-printing-form .ppm-form-group,
.ppm-printing-form .ppm-price-summary,
.ppm-printing-form h3 {
    color: #111 !important;
}

/* Country Selector Styles */
.ppm-country-select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    background: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    cursor: pointer;
}

.ppm-country-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.ppm-country-select option {
    padding: 8px 12px;
    font-size: 14px;
}

/* Country flag display in options */
.ppm-country-select option[data-flag] {
    padding-left: 30px;
}

/* Country selector container */
.ppm-country-container {
    position: relative;
    margin-bottom: 25px;
}

.ppm-country-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
    font-size: 16px;
    transition: color 0.3s ease;
}

/* Country flag preview */
.ppm-country-flag {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    pointer-events: none;
    z-index: 2;
}

.ppm-country-select.has-flag {
    padding-left: 45px;
}

/* Country info display */
.ppm-country-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #f7fafc;
    border-radius: 6px;
    font-size: 14px;
    color: #4a5568;
}

.ppm-country-info .flag {
    font-size: 16px;
}

.ppm-country-info .name {
    font-weight: 500;
}

/* Enhanced country selector wrapper */
.ppm-country-selector-wrapper {
    position: relative;
    width: 100%;
}

/* Country search input */
.ppm-country-search {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 8px;
    background: #fff;
    transition: all 0.3s ease;
}

.ppm-country-search:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Country selector with flag preview */
.ppm-country-selector-wrapper .ppm-country-select {
    position: relative;
}

.ppm-country-selector-wrapper .ppm-country-flag {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    pointer-events: none;
    z-index: 2;
    transition: all 0.3s ease;
}

/* Hover effects for country selector */
.ppm-country-select:hover {
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

.ppm-country-select:active {
    transform: translateY(0);
}

/* Country selector focus states */
.ppm-country-select:focus + .ppm-country-flag {
    color: #667eea;
}

/* Responsive country selector */
@media (max-width: 768px) {
    .ppm-country-select {
        padding: 14px 18px;
        font-size: 14px;
    }
    
    .ppm-country-select.has-flag {
        padding-left: 40px;
    }
    
    .ppm-country-flag {
        font-size: 16px;
        left: 10px;
    }
    
    .ppm-country-search {
        padding: 10px 14px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .ppm-country-select {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .ppm-country-select.has-flag {
        padding-left: 35px;
    }
    
    .ppm-country-flag {
        font-size: 14px;
        left: 8px;
    }
    
    .ppm-country-info {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .ppm-country-search {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* Animation for country selector */
@keyframes countrySelectFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ppm-country-selector-wrapper {
    animation: countrySelectFadeIn 0.3s ease-out;
}

/* Country selector loading state */
.ppm-country-select.loading {
    opacity: 0.7;
    pointer-events: none;
}

.ppm-country-select.loading::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Country selector error state */
.ppm-country-select.error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

/* Country selector success state */
.ppm-country-select.success {
    border-color: #38a169;
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.1);
}

/* Country selector disabled state */
.ppm-country-select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f7fafc;
}

/* Country selector with custom styling for different themes */
.ppm-country-select.dark-theme {
    background: #2d3748;
    color: #e2e8f0;
    border-color: #4a5568;
}

.ppm-country-select.dark-theme:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

/* Country selector with modern gradient background */
.ppm-country-select.gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.ppm-country-select.gradient:focus {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

/* Country selector with rounded corners */
.ppm-country-select.rounded {
    border-radius: 25px;
}

/* Country selector with shadow */
.ppm-country-select.shadow {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ppm-country-select.shadow:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Country selector with border animation */
.ppm-country-select.animated-border {
    position: relative;
    overflow: hidden;
}

.ppm-country-select.animated-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    transition: left 0.5s ease;
}

.ppm-country-select.animated-border:focus::before {
    left: 100%;
}
