/*!
 * Copyright (c) 2022 Dmitry Barashev, BarD Software s.r.o.
 *
 * This file is part of GanttProject, an open-source project management tool.
 *
 * GanttProject is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 * GanttProject is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GanttProject.  If not, see <http://www.gnu.org/licenses/>.
 */
@import "../app/theme";
@import "../app/dialogs";
@import "../app/buttons";
@import "../app/errors";
@import "../app/margins";
@import "../app/validation";

@mixin titled-pane-title() {
  -fx-padding: 0 0 0 0.5em;
  -fx-font-size: 125%;
  -fx-font-weight: bold;
  -fx-background-color: $gp-orange;
  -fx-fill: $gp-dark-gray;
}

@mixin titles() {
  .title {
    -fx-font-weight: bold;
    -fx-font-size: 120%;
  }
  .subtitle {
    -fx-text-fill: $gp-medium-gray;
    -fx-font-size: 80%;
    -fx-font-weight: normal;
  }
}

/* A single item in the list of available updates */
.body {
  //-fx-background-color: transparent;
}

.dlg-platform-update {
  -fx-min-height: 400;
  .header {
    @include dialog-header($gp-orange);
  }

  .content-pane {
    @include validation-pane();
    .hint-validation-pane {
      -fx-background-insets: 0 10 0 0;
      -fx-border-insets: 0 10 0 0;
    }

    -fx-padding: 20 20 20 20;

    .label-updates {
      -fx-padding: 2ex 0 0.3ex 0;
      -fx-font-size: 150%;
      -fx-border-width: 0 0 2 0;
      -fx-border-color: $gp-light-gray;
      -fx-border-insets: 0 0 20 0;
    }

    .help {
      -fx-padding: 0 0 2ex 0;
    }

    .minor-update {
      -fx-background-color: transparent;
      @include titles();

      .par {
        -fx-fill: $gp-medium-gray;
        -fx-padding: 0ex 0 0.5ex 0;
      }

      .progress {
        -fx-font-size: 80%;
        -fx-fill: $gp-medium-gray;
        -fx-padding: 0 0 2ex 0;
      }
    }

    .major-update {
      @include vertical-space-top($vertical-space-medium);
      @include titles();

      .par {
        -fx-fill: $gp-medium-gray;
        -fx-padding: 2ex 0 0.5ex 0;
        -mdfx-font-color: $gp-medium-gray;
      }
    }

    .update-from-zip {
      @include titles();

      .property-pane {
        @include vertical-space-top($vertical-space-medium);
      }
      .apply-pane {
        @include vertical-space-top($vertical-space-small);
      }
    }

    .scroll-pane {
      -fx-border-color: transparent;
      -fx-background-color: $gp-control-background;
      & > .viewport {
        -fx-background-color: transparent;
      }

      &:hover .scroll-bar {
        -fx-opacity: 1;
      }
      .scroll-bar {
        @include scroll-bar(15);
      }

      .scroll-body {
        -fx-background-color: transparent;
        -fx-padding: 1em 0 0 0;
      }
    }

  }

  .toggle-switch {
    -fx-content-display: left;
    -fx-graphic-text-gap: 0;
  }

  .button-pane {
    @include dialog-button-pane();
  }

  .alert-embedded-box {
    @include error-embedded-box($gp-error);
    .alert-error {
      @include error-label();
    }
  }
}

