/* ============================================
   Photo Resizer Tool Styles
   ============================================ */

.prt-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 30px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

.prt-container * {
    box-sizing: border-box;
}

.prt-header {
    text-align: center;
    margin-bottom: 30px;
}

.prt-title {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.prt-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.prt-privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    color: #ffffff;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.prt-privacy-icon {
    font-size: 16px;
}

.prt-upload-area {
    background: rgba(255, 255, 255, 0.95);
    border: 3px dashed #c3c4c7;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    user-select: none;
}

.prt-upload-area:hover {
    border-color: #667eea;
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.prt-upload-area.dragover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: scale(1.02);
}

.prt-upload-content {
    pointer-events: none;
}

.prt-upload-icon {
    color: #667eea;
    margin-bottom: 20px;
    display: inline-block;
}

.prt-upload-text {
    font-size: 18px;
    color: #1d2327;
    margin: 0 0 10px 0;
    font-weight: 500;
}

.prt-upload-hint {
    font-size: 14px;
    color: #646970;
    margin: 0;
}

.prt-editor {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    padding: 30px;
    margin-top: 20px;
}

.prt-preview-section {
    margin-bottom: 30px;
}

.prt-preview-container {
    background: #f0f0f1;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prt-preview-container img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.prt-file-info {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding: 10px 15px;
    background: #f6f7f7;
    border-radius: 8px;
    font-size: 14px;
    color: #646970;
    gap: 10px;
    flex-wrap: wrap;
}

.prt-controls h3 {
    font-size: 18px;
    color: #1d2327;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f1;
}

.prt-dimensions {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 25px;
}

.prt-field {
    flex: 1;
}

.prt-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 8px;
}

.prt-field input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.prt-field input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.prt-lock {
    padding-bottom: 12px;
}

.prt-lock-btn {
    width: 44px;
    height: 44px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #646970;
}

.prt-lock-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: #ffffff;
}

.prt-lock-btn:hover {
    border-color: #667eea;
}

.prt-presets {
    margin-bottom: 25px;
}

.prt-presets > label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 10px;
}

.prt-preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.prt-preset {
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #1d2327;
}

.prt-preset:hover {
    border-color: #667eea;
    background: #f0f4ff;
    color: #667eea;
}

.prt-quality {
    margin-bottom: 25px;
}

.prt-quality label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 10px;
}

.prt-quality input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e0e0e0;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.prt-quality input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.prt-quality input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.prt-format {
    margin-bottom: 25px;
}

.prt-format label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 8px;
}

.prt-format select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    background: #ffffff;
    cursor: pointer;
}

.prt-format select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.prt-target-size {
    margin-bottom: 25px;
}

.prt-target-size label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 8px;
}

.prt-target-size input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
}

.prt-target-size input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.prt-target-size small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #646970;
}

.prt-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.prt-btn {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
}

.prt-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.prt-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.prt-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.prt-btn-secondary {
    background: #f0f0f1;
    color: #1d2327;
    flex: 0 0 auto;
    padding: 16px 30px;
}

.prt-btn-secondary:hover {
    background: #e0e0e0;
}

.prt-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: prt-spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes prt-spin {
    to { transform: rotate(360deg); }
}

.prt-error {
    background: #fcf0f1;
    border: 2px solid #d63638;
    border-radius: 12px;
    padding: 15px 20px;
    margin-top: 20px;
    color: #d63638;
    font-size: 14px;
}

.prt-success {
    background: #edfaef;
    border: 2px solid #00a32a;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
    color: #00a32a;
}

.prt-success svg {
    margin-bottom: 10px;
    display: inline-block;
}

.prt-success p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

@media (max-width: 600px) {
    .prt-container {
        padding: 20px;
        border-radius: 16px;
        margin: 15px auto;
    }

    .prt-title {
        font-size: 22px;
    }

    .prt-upload-area {
        padding: 40px 20px;
    }

    .prt-dimensions {
        flex-direction: column;
        align-items: stretch;
    }

    .prt-lock {
        display: flex;
        justify-content: center;
        padding: 0;
    }

    .prt-preset-buttons {
        flex-direction: column;
    }

    .prt-actions {
        flex-direction: column;
    }

    .prt-btn-secondary {
        flex: 1;
    }
}
/* ============================================
   Ad Slot Styling
   ============================================ */

.prt-ad {
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.prt-ad:empty {
    display: none; /* hides empty slots until AdSense code is placed */
}

.prt-ad-top {
    margin-top: 0;
    margin-bottom: 25px;
}

.prt-ad-inline {
    margin-top: 30px;
    background: #f6f7f7;
    backdrop-filter: none;
}

.prt-ad-bottom {
    margin-top: 25px;
    margin-bottom: 0;
}

.prt-ad ins {
    display: block;
}

/* Responsive ads */
@media (max-width: 600px) {
    .prt-ad {
        padding: 10px;
        min-height: 60px;
        margin: 15px 0;
    }
}